//
//  UpcomingDisplayData.m
//  ViperDemo
//
//  Created by Leeesven on 17/5/17.
//  Copyright © 2017年 Leeesven. All rights reserved.
//

#import "UpcomingDisplayData.h"

@interface UpcomingDisplayData()
@property (nonatomic, copy) NSArray*    sections;
@end

@implementation UpcomingDisplayData

+ (instancetype)upcomingDisplayDataWithSections:(NSArray *)sections
{
    UpcomingDisplayData* data = [[UpcomingDisplayData alloc] init];
    
    data.sections = sections;
    
    return data;
}


- (BOOL)isEqualToUpcomingDisplayData:(UpcomingDisplayData *)data
{
    if (!data)
    {
        return NO;
    }
    
    BOOL hasEqualSections = [self.sections isEqualToArray:data.sections];
    
    return hasEqualSections;
}


- (BOOL)isEqual:(id)object
{
    if (self == object)
    {
        return YES;
    }
    
    if (![object isKindOfClass:[UpcomingDisplayData class]])
    {
        return NO;
    }
    
    return [self isEqualToUpcomingDisplayData:object];
}


- (NSUInteger)hash
{
    return [self.sections hash];
}


@end
